SlideShare a Scribd company logo
Boolean Logic
George Boole ,[object Object],[object Object],100 th  Anniversary Edition
Boolean Logic ,[object Object],[object Object],[object Object],100 th  Anniversary Edition
The AND Operation ,[object Object],[object Object],[object Object],F F F F T T a F T b AND
The OR Operation ,[object Object],[object Object],[object Object],F T F T T T a F T b OR
The NOT Operation ,[object Object],[object Object],[object Object],T F F T a NOT
Logical Conditions ,[object Object],[object Object],If (hours > 40) pay overtime If (age < 12) stay in the back seat While (count     10) print count   increment count
Logical Comparison Operators ,[object Object],A    B A    B A > B A < B A    B A = B In Math A >= B A  is greater than or equal to  B A <= B A  is less than or equal to  B A > B A  is greater than  B A < B A  is less than  B A<> B or A != B A  is not equal to  B A = B or A == B A  equals  B In Programming Condition
Compound Conditions ,[object Object],If  (  (hours > 40) AND (type = hourly)  ) pay overtime If  (  (age < 12) OR (height < 42 in.)  ) stay in the back seat While  (  (count  <= 10) AND    NOT (status = away)  ) print name.count   increment count
Boolean Logic  in Alice
Boolean Functions Functions in Alice that return true or false values are called Boolean functions. Alice has many such built-in functions, such as these two groups of basic Boolean logic functions and comparison functions.
They can be found on  the world’s functions tab
They are used inside branching and looping instruction tiles
Boolean Functions The Boolean comparison functions can be used to  create simple true or false conditions.
Boolean Functions The Boolean logic functions can be used to  create compound conditions.
Boolean Functions Alice has many other world-level and object-level fuctions that return true or false values, such as  the Boolean proximity functions shown here on aliceLiddel’s functions tab in the details area.
Boolean Functions They can be used anywhere that a Boolean value is needed, such as in this If/Else command.

More Related Content

What's hot

Python : basic operators
Python : basic operatorsPython : basic operators
Python : basic operators
S.M. Salaquzzaman
 
Step by step python(week2)
Step by step python(week2)Step by step python(week2)
Step by step python(week2)
Abhishek Jaiswal
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
David Livingston J
 
03 Operators and expressions
03 Operators and expressions03 Operators and expressions
03 Operators and expressions
maznabili
 
The BUT and NBUT Boolean logic
The BUT and NBUT Boolean logicThe BUT and NBUT Boolean logic
The BUT and NBUT Boolean logic
sciomathman
 
Binary logic
Binary logicBinary logic
Binary logic
wardjo
 
Operators
OperatorsOperators
Operators
jayesh30sikchi
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
ASHOK KUMAR REDDY
 
Operators
OperatorsOperators
Operators
Kamran
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
Anusuya123
 
Assignment12
Assignment12Assignment12
Assignment12
Sunita Milind Dol
 
C ppt
C pptC ppt
C ppt
jasmeen kr
 
Cs419 lec11 bottom-up parsing
Cs419 lec11   bottom-up parsingCs419 lec11   bottom-up parsing
Cs419 lec11 bottom-up parsing
Arab Open University and Cairo University
 
Python Basic Operators
Python Basic OperatorsPython Basic Operators
Python Basic Operators
Soba Arjun
 
Python operators
Python operatorsPython operators
Python operators
nuripatidar
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
vinay arora
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
Prankit Mishra
 
C# operators
C# operatorsC# operators
Assignment6
Assignment6Assignment6
Assignment6
Sunita Milind Dol
 
07 top-down-parsing
07 top-down-parsing07 top-down-parsing
07 top-down-parsing
Harish Khodke
 

What's hot (20)

Python : basic operators
Python : basic operatorsPython : basic operators
Python : basic operators
 
Step by step python(week2)
Step by step python(week2)Step by step python(week2)
Step by step python(week2)
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
 
03 Operators and expressions
03 Operators and expressions03 Operators and expressions
03 Operators and expressions
 
The BUT and NBUT Boolean logic
The BUT and NBUT Boolean logicThe BUT and NBUT Boolean logic
The BUT and NBUT Boolean logic
 
Binary logic
Binary logicBinary logic
Binary logic
 
Operators
OperatorsOperators
Operators
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Operators
OperatorsOperators
Operators
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
Assignment12
Assignment12Assignment12
Assignment12
 
C ppt
C pptC ppt
C ppt
 
Cs419 lec11 bottom-up parsing
Cs419 lec11   bottom-up parsingCs419 lec11   bottom-up parsing
Cs419 lec11 bottom-up parsing
 
Python Basic Operators
Python Basic OperatorsPython Basic Operators
Python Basic Operators
 
Python operators
Python operatorsPython operators
Python operators
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
C# operators
C# operatorsC# operators
C# operators
 
Assignment6
Assignment6Assignment6
Assignment6
 
07 top-down-parsing
07 top-down-parsing07 top-down-parsing
07 top-down-parsing
 

Similar to Ch 5 boolean logic

Lecture 07.pptx
Lecture 07.pptxLecture 07.pptx
Lecture 07.pptx
Mohammad Hassan
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in alice
Chaffey College
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in alice
Chaffey College
 
Computer and Network Technology (CNT) - Lecture 04
Computer and Network Technology (CNT) - Lecture 04Computer and Network Technology (CNT) - Lecture 04
Computer and Network Technology (CNT) - Lecture 04
Susantha Herath
 
Boolean Algebra - R.D.Sivakumar
Boolean Algebra - R.D.SivakumarBoolean Algebra - R.D.Sivakumar
Boolean Algebra - R.D.Sivakumar
Sivakumar R D .
 
Rthch2nts 160709112024
Rthch2nts 160709112024Rthch2nts 160709112024
Rthch2nts 160709112024
marangburu42
 
chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)
It Academy
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
Tamim Tanvir
 
Chapter 3:Programming with Java Operators and Strings
Chapter 3:Programming with Java Operators and  StringsChapter 3:Programming with Java Operators and  Strings
Chapter 3:Programming with Java Operators and Strings
It Academy
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
Er. Nawaraj Bhandari
 
Chapter 3 : Programming with Java Operators and Strings
Chapter 3 : Programming with Java Operators and  StringsChapter 3 : Programming with Java Operators and  Strings
Chapter 3 : Programming with Java Operators and Strings
It Academy
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
It Academy
 
OCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth TablesOCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth Tables
northernkiwi
 
mechanizing logic
mechanizing logicmechanizing logic
mechanizing logic
Rajendran
 
Boolean Algebra.pdf
Boolean Algebra.pdfBoolean Algebra.pdf
Boolean Algebra.pdf
ssusere02873
 
Week4_BooleanAlgebra.pptx
Week4_BooleanAlgebra.pptxWeek4_BooleanAlgebra.pptx
Week4_BooleanAlgebra.pptx
AbubakrZahid1
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
Widad Jamaluddin
 
Logic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers andLogic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers and
MuruganandhanD
 
Ref Lec 4- Conditional Statement (1).pptx
Ref Lec 4- Conditional Statement (1).pptxRef Lec 4- Conditional Statement (1).pptx
Ref Lec 4- Conditional Statement (1).pptx
BilalAhmad735613
 
DE notes
DE notesDE notes

Similar to Ch 5 boolean logic (20)

Lecture 07.pptx
Lecture 07.pptxLecture 07.pptx
Lecture 07.pptx
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in alice
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in alice
 
Computer and Network Technology (CNT) - Lecture 04
Computer and Network Technology (CNT) - Lecture 04Computer and Network Technology (CNT) - Lecture 04
Computer and Network Technology (CNT) - Lecture 04
 
Boolean Algebra - R.D.Sivakumar
Boolean Algebra - R.D.SivakumarBoolean Algebra - R.D.Sivakumar
Boolean Algebra - R.D.Sivakumar
 
Rthch2nts 160709112024
Rthch2nts 160709112024Rthch2nts 160709112024
Rthch2nts 160709112024
 
chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
 
Chapter 3:Programming with Java Operators and Strings
Chapter 3:Programming with Java Operators and  StringsChapter 3:Programming with Java Operators and  Strings
Chapter 3:Programming with Java Operators and Strings
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 3 : Programming with Java Operators and Strings
Chapter 3 : Programming with Java Operators and  StringsChapter 3 : Programming with Java Operators and  Strings
Chapter 3 : Programming with Java Operators and Strings
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
OCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth TablesOCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth Tables
 
mechanizing logic
mechanizing logicmechanizing logic
mechanizing logic
 
Boolean Algebra.pdf
Boolean Algebra.pdfBoolean Algebra.pdf
Boolean Algebra.pdf
 
Week4_BooleanAlgebra.pptx
Week4_BooleanAlgebra.pptxWeek4_BooleanAlgebra.pptx
Week4_BooleanAlgebra.pptx
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
 
Logic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers andLogic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers and
 
Ref Lec 4- Conditional Statement (1).pptx
Ref Lec 4- Conditional Statement (1).pptxRef Lec 4- Conditional Statement (1).pptx
Ref Lec 4- Conditional Statement (1).pptx
 
DE notes
DE notesDE notes
DE notes
 

More from Chaffey College

Strings Objects Variables
Strings Objects VariablesStrings Objects Variables
Strings Objects Variables
Chaffey College
 
Ruby Chapter 2
Ruby Chapter 2Ruby Chapter 2
Ruby Chapter 2
Chaffey College
 
Social networks and games
Social networks and gamesSocial networks and games
Social networks and games
Chaffey College
 
Serious games
Serious gamesSerious games
Serious games
Chaffey College
 
Chapter 05
Chapter 05Chapter 05
Chapter 05
Chaffey College
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
Chaffey College
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
Chaffey College
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien wars
Chaffey College
 
Target markets
Target marketsTarget markets
Target markets
Chaffey College
 
Ch 8 introduction to data structures
Ch 8 introduction to data structuresCh 8 introduction to data structures
Ch 8 introduction to data structures
Chaffey College
 
Ch 8 data structures in alice
Ch 8  data structures in aliceCh 8  data structures in alice
Ch 8 data structures in alice
Chaffey College
 
Ch 7 recursion
Ch 7 recursionCh 7 recursion
Ch 7 recursion
Chaffey College
 
Intro to gml
Intro to gmlIntro to gml
Intro to gml
Chaffey College
 
Power point unit d
Power point unit dPower point unit d
Power point unit d
Chaffey College
 
Power point unit c
Power point unit cPower point unit c
Power point unit c
Chaffey College
 
Power point unit b
Power point unit bPower point unit b
Power point unit b
Chaffey College
 
Power point unit a
Power point unit aPower point unit a
Power point unit a
Chaffey College
 
Gamegraphics
GamegraphicsGamegraphics
Gamegraphics
Chaffey College
 
Gamesound
GamesoundGamesound
Gamesound
Chaffey College
 
Ch 6 text and sound in alice
Ch 6 text and sound in aliceCh 6 text and sound in alice
Ch 6 text and sound in alice
Chaffey College
 

More from Chaffey College (20)

Strings Objects Variables
Strings Objects VariablesStrings Objects Variables
Strings Objects Variables
 
Ruby Chapter 2
Ruby Chapter 2Ruby Chapter 2
Ruby Chapter 2
 
Social networks and games
Social networks and gamesSocial networks and games
Social networks and games
 
Serious games
Serious gamesSerious games
Serious games
 
Chapter 05
Chapter 05Chapter 05
Chapter 05
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien wars
 
Target markets
Target marketsTarget markets
Target markets
 
Ch 8 introduction to data structures
Ch 8 introduction to data structuresCh 8 introduction to data structures
Ch 8 introduction to data structures
 
Ch 8 data structures in alice
Ch 8  data structures in aliceCh 8  data structures in alice
Ch 8 data structures in alice
 
Ch 7 recursion
Ch 7 recursionCh 7 recursion
Ch 7 recursion
 
Intro to gml
Intro to gmlIntro to gml
Intro to gml
 
Power point unit d
Power point unit dPower point unit d
Power point unit d
 
Power point unit c
Power point unit cPower point unit c
Power point unit c
 
Power point unit b
Power point unit bPower point unit b
Power point unit b
 
Power point unit a
Power point unit aPower point unit a
Power point unit a
 
Gamegraphics
GamegraphicsGamegraphics
Gamegraphics
 
Gamesound
GamesoundGamesound
Gamesound
 
Ch 6 text and sound in alice
Ch 6 text and sound in aliceCh 6 text and sound in alice
Ch 6 text and sound in alice
 

Ch 5 boolean logic

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Boolean Logic in Alice
  • 11. Boolean Functions Functions in Alice that return true or false values are called Boolean functions. Alice has many such built-in functions, such as these two groups of basic Boolean logic functions and comparison functions.
  • 12. They can be found on the world’s functions tab
  • 13. They are used inside branching and looping instruction tiles
  • 14. Boolean Functions The Boolean comparison functions can be used to create simple true or false conditions.
  • 15. Boolean Functions The Boolean logic functions can be used to create compound conditions.
  • 16. Boolean Functions Alice has many other world-level and object-level fuctions that return true or false values, such as the Boolean proximity functions shown here on aliceLiddel’s functions tab in the details area.
  • 17. Boolean Functions They can be used anywhere that a Boolean value is needed, such as in this If/Else command.

Editor's Notes

  1. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  2. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  3. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  4. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  5. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  6. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  7. The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.